FROM centos:centos6
MAINTAINER He Kaihao <1157173310@qq.com>

RUN yum -y install openssh-server epel-release wget tar && \
    yum -y install pwgen && \
    rm -f /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_rsa_key && \
    ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key && \
    ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key && \
    sed -i "s/#UsePrivilegeSeparation.*/UsePrivilegeSeparation no/g" /etc/ssh/sshd_config && \
    sed -i "s/UsePAM.*/UsePAM no/g" /etc/ssh/sshd_config && \
    wget http://download.kanglesoft.com/easypanel/ep.sh -O ep.sh && \
    sh ep.sh && \
    wget https://raw.githubusercontent.com/1265578519/kangle/master/php/5.2/5217/php5217.sh -O php5217.sh && \
    sh php5217.sh && \
    wget https://raw.githubusercontent.com/1265578519/kangle/master/php/7.0/700/php700.sh -O php700.sh && \
    sh php700.sh && \
    wget http://github.itzmx.com/1265578519/kangle/master/php/5.5/5532/php5532.sh -O php5532.sh && \
    sh php5532.sh && \
    wget http://github.itzmx.com/1265578519/kangle/master/php/5.6/5618/php5618.sh -O php5618.sh && \
    sh php5618.sh && \
    wget http://github.itzmx.com/1265578519/kangle/master/php/5.4/5445/php5445.sh -O php5445.sh && \
    sh php5445.sh && \
    wget https://raw.githubusercontent.com/1265578519/kangle/master/php/5.6/5611/php5611.sh -O php5611.sh && \
    sh php5611.sh && \
    wget https://raw.githubusercontent.com/1265578519/kangle/master/php/5.5/5527/php5527.sh -O php5527.sh && \
    sh php5527.sh && \
    wget https://raw.githubusercontent.com/1265578519/kangle/master/php/5.4/5443/php5443.sh -O php5443.sh && \
    sh php5443.sh

ADD set_root_pw.sh /set_root_pw.sh
ADD run.sh /run.sh
RUN chmod +x /*.sh

ENV AUTHORIZED_KEYS **None**

EXPOSE 21
EXPOSE 22
EXPOSE 80
EXPOSE 8080
EXPOSE 3306
CMD ["/run.sh"]